package Game;

import java.awt.Graphics2D;

public class MoneyManager 
{
	static Money[] money;
	
	private MoneyManager() {}
	
	public static void Setup()
	{
		
		money = new Money[]
				{
					  new Money(45, 480, 81, 108, 100),
					  new Money(210, 480, 81, 108, 100),
					  new Money(365, 480, 81, 108, 100),
					  new Money(530, 480, 81, 108, 100)
				};
	}

	public static void Update()
	{
		for(Money m : money)
		{
			m.lifeBar.UpdatePosition(m.getRectangle());
			if(m.lifeBar.CurrentEnergy <= 0)
			{
				System.out.println("perdeu");
				Level.perdeu = true;
				SceneManager.ChangeScene();
			}
		}
	}
	
	public static void Draw(Graphics2D g2d)
	{
		for(Money m : money)
		{
			m.Draw(g2d);
		}
	}
}
